Indenting Text

While writing a paragraph, you may want the first line of the paragraph to appear as indented to the right. In that case, you can apply text indentation to the text written on a Web page. To apply text-indentation, you need to use the text-indent property of the text.

Let’s do the following steps to indent the text present on an HTML Web page:


<!DOCTYPE html>
<html>
<head>
    <title>Indenting Text</title>
<style type=”text/css”>
    body{text-indent: 40px; font-family: Georgia; font-size: large;}
</style>
</head>
<body>
    The syntax of CSS is slightly different from that of HTML. In contrast to the angle brackets, equal sign, and quotation marks found in HTML syntax, CSS syntax contains curly braces, colon, and semicolon,
</body>
</html>

Save the document with the name of TextIndenting.html and open on browser.